<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 伪类选择器 :first-child(首位) :last-child(末尾) */
        div:first-child{
            background-color: red;
        }
        /* 选取页面div最后元素  */
    div:last-child{
        background-color: blue;
    }
    /* 选取页面某个元素 div:nth-child(num)*/
    div:nth-child(5){
     background-color: pink;
    }
    /* 选取奇数标签 nth-child（odd) */
     div:nth-child(odd){
        color: orange;
        font-size: 25px;
     }
       /* 选取偶数标签 nth-child（even) */
       div:nth-child(even){
        color: aqua;
       }
       /* 选取有规律标签 1 4 7 3n+1(n从0开始) */
       div:nth-child(3n+1){
        width: 100px;
        height: 100px;
       }
       /* 通配符选择器 普遍选择器 *表示选择所有 权重为0 */
       *{
        text-decoration: underline;
       }
    </style>
</head>
<body>
    <div>我是div1</div>
    <div>我是div2</div>
    <div>我是div3</div>
    <div>我是div4</div>
    <div>我是div5</div>
    <div>我是div6</div>
    <div>我是div7</div>
    <div>我是div8</div>
</body>
</html>